<?php 
		$sql = "SELECT com_nome,com_text,com_data,com_id FROM commenti WHERE com_art = '{$id_articolo}' ORDER BY com_id DESC";
		$query = @mysql_query($sql) or die (mysql_error());
	    if(mysql_num_rows($query) > 0){
    		$row = mysql_fetch_array($query) or die (mysql_error());
            $com_id = stripslashes($row['com_id']);
    		$nome = stripslashes($row['com_nome']);
    		$testo = stripslashes($row['com_text']);
    		$com_data = $row['com_data'];
            $result = mysql_query($sql) or die ("Errore: ".mysql_error());
            while($row = mysql_fetch_assoc($result)){
?>
            <div id="comment-box"><?=$row['com_text'];?><br /><hr>
                <span class="comment-box-info">Scritto da</span>: <span class="comment-box-name"><?=$row['com_nome'];?></span> - <span class="comment-box-info"><?=$row['com_data'];?></span>
<?php
                if(isset($_SESSION['utente'])){
?>
                <div id="floatright"><span class="comment-box-name"><a href="./revise_comment.php?com_id=<?=$row['com_id'];?>">Modifica</a> - <a href="./includes/delete_comment.php?com_id=<?=$row['com_id'];?>" onclick="return confirm('Eliminare definitivamente il commento?')"> Elimina</a></span></div>
<?php
                }
?>
            </div>
<?php
            }
        }
?>